package com.shuma.shopmanage.model.shop.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.persistence.*;
import java.sql.Timestamp;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Entity
@Table(name = "goods")

@Data
public class Goods {

    @Id
    private Long id;

//    @Column(name = "name", nullable = false)
    private String name;

//    @Column(name = "img_url", nullable = false)
    private String imgUrl;

    @Column(name = "description", nullable = false)
    private String description;

    @Column(name = "type", nullable = false)
    private String type;

    @Column(name = "detail", nullable = false)
    private String detail;

    @Column(name = "cat_id")
    private Long catId;

    @Column(name = "provider_name", nullable = false)
    private String providerName;

    @Column(name = "phone", nullable = false)
    private String phone;

    @Column(name = "service", nullable = false)
    private String service;

    @Column(name = "buy_type", nullable = false)
    private Integer buyType;

    @Column(name = "point_price", nullable = false)
    private Integer pointPrice;

    @Column(name = "cash_price", nullable = false)
    private BigDecimal cashPrice;

    @Column(name = "buy_limit", nullable = false)
    private Integer buyLimit;

    @Column(name = "store", nullable = false)
    private Integer store;

    @Column(name = "create_user_id", nullable = false)
    private Long createUserId;

    @Column(name = "manage_user_id", nullable = false)
    private Long manageUserId;

    @Column(name = "on_time", nullable = false)
    private Date onTime;

    @Column(name = "down_time", nullable = false)
    private Date downTime;

    @Column(name = "status")
    private Integer status;

    @Column(name = "approval_status")
    private Integer approvalStatus;

    @Column(name = "is_delete", nullable = true)
    private Boolean isDelete;

    @Column(name = "create_time", nullable = true, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
    private LocalDateTime createTime;

    @Column(name = "update_time", nullable = true, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
    private LocalDateTime updateTime;

}